% -*- Latex -*- \documentstyle[11pt]{article} %\pagestyle{empty} \headheight 0pt \headsep 0pt \textheight 652.4pt \topmargin 0pt \long\def\comment#1{} \newenvironment{definition}{\par\medskip\addtocounter{theorem}{1}% \noindent{\bf Definition \arabic{theorem}}\quad }{\hfill\qed\quad\medskip} \def\A{{\bf\mbox{$\cal A$}}} \def\B{{\bf\mbox{$\cal B$}}} \def\C{{\bf\mbox{$\cal C$}}} \def\D{{\bf\mbox{$\cal D$}}} \def\E{{\bf\mbox{$\cal E$}}} \def\I{{\bf\mbox{$\cal I$}}} \def\T{{\bf\mbox{$\cal T$}}} \def\X{{\bf\mbox{$\cal X$}}} \def\Y{{\bf\mbox{$\cal Y$}}} \def\one{{\bf 1}} \def\two{{\bf 2}} \def\three{{\bf 3}} %\def\R{{\mbox{${\bf\bar R}_+$}}} \def\R{{\bf R}} \def\Rdp{{\bf R}^{\tt d}} \def\N{{\mbox{\bf N}}} \def\Set{{\bf Set}} \def\SET{{\bf SET}} \def\SSM{{\bf COSMON}} \def\Seti{{\bf Seti}} \def\Pos{{\bf Pos}} \def\Pom{{\bf Pom}} \def\Pros{{\bf Pros}} \def\Prom{{\bf Prom}} \def\Pomi{{\bf Pomi}} \def\Cat{{\bf Cat}} \def\CAT{{\bf CAT}} \def\Grph{{\bf Grph}} \def\Hom{{\rm Hom}} \def\op{^{\rm op}} \def\ob{{\rm ob}} \def\min{{\rm min}} \def\max{{\rm max}} \def\SR{{\mathord{\bf SR}}} %\def\DC{\D{\mbox -}\Cat} %\def\DpC{\D'{\mbox -}\Cat} \def\Z2{{\mbox{\bf Z$_2$}}} \def\DYN{{\mbox{\bf DYN}}} \def\TMP{{\mbox{\bf TMP}}} \def\d{\delta} \def\comma{\mathop{\rhd}} \def\lc{\underline{;}} \def\ll{\underline{\lambda}} \def\darrow{\mathop{\downarrow}} % let's flush this, ok? \def\vertex{\mathop{\rm vert}} \def\ #1{\stackrel{#1}{\longrightarrow}} \let\ =\darrow \def\<#1>{\langle #1 \rangle} \def\eqalign#1{\vbox{\halign{\hfil$##$&$\quad##$\hfil\cr #1}}} \def\congh{\raise0.5ex\hbox{$\smash\cong$}} \def\UV{U\ \def\Tau{T} \def\qed{\vrule height6pt width4pt depth0pt} % end-of-proof etc. \mathcode`\:="603A \newtheorem{theorem}{Theorem} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newenvironment{proof}{\medskip\noindent{\it Proof}:\quad}{\quad\qed\medskip} \newenvironment{proofo}{\medskip\noindent{\it Outline of Proof}:\quad}{\quad\qed\medskip} %%======================================================================% %% TeX macros for drawing rectangular category-theory diagrams % %% % %% Paul Taylor % %% % %% Department of Computing, Imperial College, London SW7 2BZ % %% +44 1 589 5111 x 5057 pt@doc.ic.ac.uk % %% % %% For user documentation, see "diagram.doc.tex" % %% % %% COPYRIGHT NOTICE: % %% This package may be copied and used freely for any academic % %% (not commercial or military) purpose, on condition that it % %% is not altered in any way, and that an acknowledgement is % %% included in any published paper using it. % %% % %%======================================================================% \message{} \let\then \relax\font\tenln=line10 \newdimen\zpt\zpt=0pt \def\tozpt{to \zpt} \mathchardef\lt="313C \mathchardef\gt="313E \newif\ifincommdiag\incommdiagfalse \def\diagram{\bgroup\incommdiagtrue\null\baselineskip3.8ex \lineskip\zpt \lineskiplimit\zpt\mathsurround\zpt\tabskip\zpt\let\\\cr\,\vcenter\bgroup \halign\bgroup\hfil$##$\hfil&&\hfil$##$\hfil\cr\mathstrut\cr} \def\enddiagram{\crcr\mathstrut\crcr\egroup\horizreformatmatrix\egroup\,% \egroup} \def\commdiag#1{{\diagram#1\enddiagram}} \def\across#1{\span\omit\mscount=#1 \loop\ifnum\mscount>2 \spAn\repeat \ignorespaces} \def\spAn{\relax\span\omit\advance\mscount by -1} \def\horizreformatmatrix{\bombparameters\skip7=\zpt\setbox8=\vbox{}\loop \setbox9=\lastbox\ifhbox9 \horizreformatrow\setbox8=\vbox{\box9\vskip\skip7% \unvbox8}\skip7=\lastskip\unskip\repeat\vskip\skip7 \unvbox8 } \def\horizreformatrow{\setbox9=\hbox{\unhbox9\setbox5=\box9\spanspace\zpt \prevspace\zpt\skip9=\lastskip\unskip\setbox6=\hbox{}\loop\setbox7=\lastbox \ifhbox7\setbox0=\hbox{\unhcopy7}\hsize=.5\wd0 \ourspace=.5\wd7 \advance \ourspace-.5\wd0 \horizreformatcell\skip8=\lastskip\unskip\repeat\hskip\skip8% \ifhbox5\box5\fi\unhbox6}} \def\bombparameters{\parfillskip\zpt minus10\hsize\linepenalty9000\parskip \zpt\parindent\zpt\everypar{}\pretolerance10000 \tolerance10000 \hyphenpenalty 10000 \exhyphenpenalty10000 \adjdemerits0 \doublehyphendemerits0 \finalhyphendemerits0 \leftskip\zpt\rightskip\zpt\looseness0 \hfuzz10\hsize} \def\addtobomblist{\global\setbox6=\hbox{\box7\hskip\skip8\ifhbox5\ifdim \ourspace=\zpt\then\box5\else\hbox to\wd5{\kern-\ourspace\unhbox5}\fi\fi \unhbox6}} \newdimen\prevspace\newdimen\ourspace\newdimen\spanspace \def\horizreformatcell{\setbox0=\vtop{\noindent\unhcopy0\endgraf\ifcase \prevgraf\global\advance\spanspace\ourspace\global\ourspace\zpt\addtobomblist \or\global\prevspace=\ourspace\addtobomblist\or\setbox2=\lastbox\unskip \unpenalty\setbox1=\lastbox\global\setbox7=\hbox to.5\wd7{\kern\spanspace \unhbox2 \unskip\unskip\unpenalty\global\advance\prevspace2\spanspace\kern-% \prevspace\hskip\parfillskip}\global\ourspace\zpt\prevspace=\wd7 \addtobomblist\global\setbox5=\hbox to\prevspace{\unhbox1 \unskip\unpenalty \kern-\spanspace\global\spanspace\zpt\hskip\parfillskip}\global\prevspace\zpt \fi}} \newif\ifmoremapargs\newif\ifmapargisupper \def\gettwoargs{\let\upperlabel\empty\let\lowerlabel\empty\moremapargstrue \mapargisuppertrue\def\cmd{\mapargisupperfalse\ifmoremapargs\then\let\next \whatis\let\cmd\thecmd\else\let\next\thecmd\fi\next}\whatis} \def\whatis{\futurelet\thenexttoken\showcat} \def\getlabeldocmd#1{\ifmapargisupper\def\upperlabel{#1}\else\def\lowerlabel{% #1}\fi\cmd} \def\eattokengetlabeldocmd#1{\getlabeldocmd} \def\eatspacerepeat{\afterassignment\whatis\let\junk= } \def\catcase#1:#2\esac#3\esacs{{\ifcat\noexpand\thenexttoken#1\gdef\next{#2}% \else\gdef\next{#3\esacs}\fi}\next}\def\tokcase#1:#2\esac#3\esacs{{\ifx \thenexttoken#1\gdef\next{#2}\else\gdef\next{#3\esacs}\fi}\next}\def\default:% #1\esac#2\esacs{#1}\let\esacs\relax \def\showcat{\catcase\egroup:\moremapargsfalse\cmd\esac\catcase{&}:% \moremapargsfalse\cmd\esac\catcase$:\moremapargsfalse\cmd\esac\catcase^:% \mapargisuppertrue\eattokengetlabeldocmd\esac\catcase_:\mapargisupperfalse \eattokengetlabeldocmd\esac\catcase{ }:\eatspacerepeat\esac\tokcase{\cr}:% \moremapargsfalse\cmd\esac\tokcase{\crcr}:\moremapargsfalse\cmd\esac\tokcase \end:\moremapargsfalse\cmd\esac\tokcase\enddiagram:\moremapargsfalse\cmd\esac \tokcase\across:\moremapargsfalse\cmd\esac\tokcase\relax:\moremapargsfalse \cmd\esac\tokcase\kern:\moremapargsfalse\cmd\esac\tokcase\mkern:% \moremapargsfalse\cmd\esac\default:\ifincommdiag\then\let\next\getlabeldocmd \else\moremapargsfalse\let\next\cmd\fi\next\esac\esacs} \newdimen\HorizontalLineHeight\HorizontalLineHeight0.628ex \newdimen \HorizontalLineDepth\HorizontalLineDepth-0.534ex \def\horizhtdp{height% \HorizontalLineHeight depth\HorizontalLineDepth} \newdimen \HorizontalMapLength\HorizontalMapLength5em \def\makeharrowpart#1{\hbox{% \mathsurround\zpt$\mkern-1.5mu{#1}\mkern-1.5mu$}} \def\justhorizline{-} \def\HorizontalMap#1#2#3#4#5{\setbox1=\makeharrowpart{#1}\def\arrowfillera{#2% }\def\arrowfillerb{#4}\setbox5=\makeharrowpart{#5}\ifx\arrowfillera \justhorizline\then\def\arra{\hrule\horizhtdp}\def\kea{\kern-0.01em}\let \arrstruthtdp\horizhtdp\else\def\kea{\kern-0.15em}\setbox2=\hbox{\kea${% \arrowfillera}$\kea}\def\arra{\copy2}\def\arrstruthtdp{height\ht2 depth\dp2 }% \fi\ifx\arrowfillerb\justhorizline\then\def\arrb{\hrule\horizhtdp}\def\keb{% kern-0.01em}\ifx\arrowfillera\empty\then\let\arrstruthtdp\horizhtdp\fi\else \def\keb{\kern-0.15em}\setbox4=\hbox{\keb${\arrowfillerb}$\keb}\def\arrb{% \copy4}\ifx\arrowfilera\empty\then\def\arrstruthtdp{height\ht4 depth\dp4 }\fi \fi\setbox3=\makeharrowpart{{#3}\vrule width\zpt\arrstruthtdp} \dimen3=\wd3 \let\thecmd\execHorizontalMap\gettwoargs} \def\labelstyle{\ifincommdiag\textstyle\else\scriptstyle\fi} \def\execHorizontalMap{\setbox6=\hbox{$\quad\labelstyle\upperlabel\quad$}% \setbox7=\hbox{$\quad\labelstyle\lowerlabel\quad$}\dimen0=\wd6 \ifdim\dimen0<% \wd7\then\dimen0=\wd7\fi\ifdim\dimen0<\HorizontalMapLength\then\dimen0=% \HorizontalMapLength\fi\skip2=.5\dimen0 \ifincommdiag plus 1fill\fi minus\zpt \advance\skip2-.5\wd3 \skip4=\skip2 \advance\skip2-\wd1 \advance\skip4-\wd5 \kern0.4em \box1 \xleaders\arra\hskip\skip2 \vbox\ifincommdiag\tozpt\fi{% \offinterlineskip\ifincommdiag\vss\fi\hbox to\dimen3{\hss\unhbox6\hss}\kern0.% 7ex \vtop\ifincommdiag\tozpt\fi{\box3 \kern0.7ex \hbox to\dimen3{\hss\unhbox7% \hss}\ifincommdiag\vss\fi}}\ifincommdiag\kern-.5\dimen3\penalty-9999\null \kern.5\dimen3\fi\xleaders\arrb\hskip\skip4 \box5 \kern0.4em } \newdimen\VerticalMapHeight\VerticalMapHeight5ex \newdimen\VerticalMapDepth \VerticalMapDepth4ex \newdimen\VerticalMapExtraHeight\VerticalMapExtraHeight \zpt\newdimen\VerticalMapExtraDepth\VerticalMapExtraDepth\zpt\newdimen \VerticalLineWidth\VerticalLineWidth0.04em \def\justverticalline{|}\def \makevarrowpart#1{\hbox\tozpt{\hss$\kern\VerticalLineWidth{#1}$\hss}} \def\VerticalMap#1#2#3#4#5{\setbox1=\makevarrowpart{#1}\def\arrowfillera{#2}% \setbox3=\makevarrowpart{#3}\def\arrowfillerb{#4}\setbox5=\makevarrowpart{#5}% \skip2=\VerticalMapHeight plus 1 fill \advance\skip2-\ht3 \advance\skip2% \VerticalMapExtraHeight\advance\skip2-\ht1 \advance\skip2-\dp1 \skip4=% \VerticalMapDepth plus 1 fill \advance\skip4-\dp3 \advance\skip4% \VerticalMapExtraDepth\advance\skip4-\ht5 \advance\skip4-\dp5 \ifx \arrowfillera\justverticalline\then\def\arra{\vrule width\VerticalLineWidth}% \def\kea{\kern-0.05ex}\else\def\kea{\kern-0.35ex}\setbox2=\vbox{\kea \makevarrowpart\arrowfillera\kea}\def\arra{\copy2}\fi\ifx\arrowfillerb \justverticalline\then\def\arrb{\vrule width\VerticalLineWidth}\def\keb{\kern -0.05ex}\else\def\keb{\kern-0.35ex}\setbox4=\vbox{\keb\makevarrowpart \arrowfillerb\keb}\def\arrb{\copy4}\fi\let\thecmd\execVerticalMap\gettwoargs} \def\execVerticalMap{\llap{$\labelstyle\upperlabel\>$}\vbox{\offinterlineskip \kern-\VerticalMapExtraHeight\kern0.9ex \box1 \kea\xleaders\arra\vskip\skip2% \kea\vtop{\box3 \keb\xleaders\arrb\vskip\skip4\keb\box5 \kern0.9ex \kern-% \VerticalMapExtraDepth}}\rlap{$\labelstyle\>\lowerlabel$}} \newif\ifPositiveGradient\PositiveGradienttrue\newif\ifClimbing\Climbingtrue \newcount\DiagonalChoice\DiagonalChoice1 \newcount\lineno\newcount\rowno \newcount\charno\newcount\DiagonalLineSegments\DiagonalLineSegments2 \def\laf{\afterassignment\xlaf\charno='} \def\xlaf{\hbox{\tenln\char\charno}} \def\lah{\afterassignment\xlah\charno='} \def\xlah{\hbox{\rlap{\unhcopy2}% \tenln\char\charno}} \def\makedarrowpart#1{\hbox{\mathsurround\zpt${#1}$}} \def\DiagonalMap#1#2#3#4#5{\setbox2=\makedarrowpart{#2}\setbox1=% \makedarrowpart{#1}\setbox5=\makedarrowpart{#5}\ifPositiveGradient\then\let \mv\raise\else\let\mv\lower\fi\setbox0=\hbox{$\vcenter{\kern.9ex \hbox{\kern.% 4em \lineno=0 \mv-\ht1\box1 \loop\ifnum\lineno<\DiagonalLineSegments\mv \lineno\ht2\copy2 \advance\lineno1 \repeat\mv\lineno\ht2\box5 \kern.4em }% \kern.9ex }$} \dimen0=.5\wd0 \let\thecmd\execDiagonalLine\gettwoargs} \def\execDiagonalLine{\kern\dimen0 \mv.5\wd2\hbox\tozpt{\hss$\labelstyle \upperlabel$\kern.5\ht2}\kern-\dimen0 \box0 \kern-\dimen0 \mv-.5\wd2\hbox \tozpt{\kern.5\ht2$\labelstyle\lowerlabel$\hss}\kern\dimen0 } \def\rhvee{\mkern-10mu\gt} \def\lhvee{\lt\mkern-10mu} \def\dhvee{\vbox\tozpt{% \vss\hbox{$\vee$}}} \def\uhvee{\vbox\tozpt{\hbox{$\wedge$}\vss}} \def\rhcvee{% \mkern-10mu\succ} \def\lhcvee{\prec\mkern-10mu} \def\dhcvee{\vbox\tozpt{\vss \hbox{$\curlyvee$}}} \def\uhcvee{\vbox\tozpt{\hbox{$\curlywedge$}\vss}} \def \rhvvee{\mkern-10mu\gg} \def\lhvvee{\ll\mkern-10mu} \def\dhvvee{\vbox\tozpt{% \vss\hbox{$\vee$}\kern-.6ex\hbox{$\vee$}}} \def\uhvvee{\vbox\tozpt{\hbox{$% \wedge$}\kern-.6ex\hbox{$\wedge$}\vss}} \def\twoheaddownarrow{\rlap{$% \downarrow$}\raise-.5ex\hbox{$\downarrow$}} \def\twoheaduparrow{\rlap{$% \uparrow$}\raise.5ex\hbox{$\uparrow$}} \def\triangleup{{\scriptscriptstyle \bigtriangleup}} \def\littletriangledown{{\scriptscriptstyle\triangledown}} \def\htdot{\mkern3.15mu\cdot\mkern3.15mu} \def\vtdot{\vbox to 1.46ex{\vss \hbox{$\cdot$}}} \def\utbar{\vrule height 0.093ex depth\zpt width 0.4em} \let \dtbar\utbar\def\rtbar{\mkern1.5mu\vrule height 1.1ex depth.06ex width .04em% \mkern1.5mu} \let\ltbar\rtbar\def\rthooka{\raise.603ex\hbox{$% \scriptscriptstyle\subset$}} \def\lthooka{\raise.603ex\hbox{$% \scriptscriptstyle\supset$}} \def\rthookb{\raise-.022ex\hbox{$% \scriptscriptstyle\subset$}} \def\lthookb{\raise-.022ex\hbox{$% \scriptscriptstyle\supset$}} \def\dthookb{\hbox{$\scriptscriptstyle\cap$}% \mkern5.5mu} \def\uthookb{\hbox{$\scriptscriptstyle\cup$}\mkern4.5mu} \def \dthooka{\mkern6mu\hbox{$\scriptscriptstyle\cap$}} \def\uthooka{\mkern6mu% \hbox{$\scriptscriptstyle\cup$}} \def\hfdot{\mkern3.15mu\cdot\mkern3.15mu} \def\vfdot{\vbox to 1.46ex{\vss\hbox{$\cdot$}}} \def\vfdashstrut{\vrule width% \zpt height1.3ex depth0.7ex} \def\vfthedash{\vrule width\VerticalLineWidth height0.6ex depth \zpt} \def\hfthedash{\vrule\horizhtdp width 0.26em} \def \hfdash{\mkern5.5mu\hfthedash\mkern5.5mu} \def\vfdash{\vfdashstrut\vfthedash} \def\dmcornervert{\vrule width\VerticalLineWidth height\HorizontalLineHeight} \def\rdmcorner{\kern.4em\dmcornervert\vrule width .4em \horizhtdp} \def \ldmcorner{\vrule width .4em \horizhtdp\dmcornervert\kern.4em} \def\rumcorner {\kern.4em\vrule width .4em \horizhtdp} \def\lumcorner{\vrule width .4em \horizhtdp\kern.4em} \def\urmcorner{\mkern-4.2mu} \let\drmcorner\urmcorner \let\dlmcorner\urmcorner\let\ulmcorner\urmcorner \def\NorthWest{\PositiveGradientfalse\Climbingtrue\DiagonalChoice0 } \def \NorthEast{\PositiveGradienttrue\Climbingtrue\DiagonalChoice1 } \def \SouthWest{\PositiveGradienttrue\Climbingfalse\DiagonalChoice3 } \def \SouthEast{\PositiveGradientfalse\Climbingfalse\DiagonalChoice2 } \def\nwhTO{% \nwarrow\mkern-1mu} \def\nehTO{\mkern-.1mu\nearrow} \def\sehTO{\searrow\mkern -.02mu} \def\swhTO{\mkern-.8mu\swarrow} \def\NW{\NorthWest\DiagonalMap{\lah 111}{\laf100}{\laf100}{\laf100}{\laf100}} \def\NE{\NorthEast\DiagonalMap{\laf 0}{\laf0}{\laf0}{\laf0}{\lah22}} \def\SW{\SouthWest\DiagonalMap{\lah11}{\laf0% }{\laf0}{\laf0}{\laf0}} \def\SE{\SouthEast\DiagonalMap{\laf100}{\laf100}{\laf 100}{\laf100}{\lah122}} \def\rTo{\HorizontalMap\empty-\empty-\rhvee} \def\lTo{\HorizontalMap\lhvee-% \empty-\empty} \def\dTo{\VerticalMap\empty|\empty|\dhvee} \def\uTo{% \VerticalMap\uhvee|\empty|\empty} \let\uFrom\uTo\let\lFrom\lTo \def\rDotsto{\HorizontalMap\empty\hfdot\hfdot\hfdot\rhvee} \def\lDotsto{% \HorizontalMap\lhvee\hfdot\hfdot\hfdot\empty} \def\dDotsto{\VerticalMap\empty \vfdot\vfdot\vfdot\dhvee} \def\uDotsto{\VerticalMap\uhvee\vfdot\vfdot\vfdot \empty} \let\uDotsfrom\uDotsto\let\lDotsfrom\lDotsto \def\rDashto{\HorizontalMap\empty\hfdash\hfdash\hfdash\rhvee} \def\lDashto{% \HorizontalMap\lhvee\hfdash\hfdash\hfdash\empty} \def\dDashto{\VerticalMap \empty\vfdash\vfdash\vfdash\dhvee} \def\uDashto{\VerticalMap\uhvee\vfdash \vfdash\vfdash\empty} \let\uDashfrom\uDashto\let\lDashfrom\lDashto \def\rImplies{\HorizontalMap==\empty=\Rightarrow} \def\lImplies{% \HorizontalMap\Leftarrow=\empty==} \def\dImplies{\VerticalMap\|\|\empty\|% \Downarrow} \def\uImplies{\VerticalMap\Uparrow\|\empty\|\|} \let\uImpliedby \uImplies\let\lImpliedby\lImplies \def\rMapsto{\HorizontalMap\rtbar-\empty-\rhvee} \def\lMapsto{\HorizontalMap \lhvee-\empty-\ltbar} \def\dMapsto{\VerticalMap\dtbar|\empty|\dhvee} \def \uMapsto{\VerticalMap\uhvee|\empty|\utbar} \let\uMapsfrom\uMapsto\let \lMapsfrom\lMapsto \def\rIntoA{\HorizontalMap\rthooka-\empty-\rhvee} \def\rIntoB{\HorizontalMap \rthookb-\empty-\rhvee} \def\lIntoA{\HorizontalMap\lhvee-\empty-\lthooka} \def \lIntoB{\HorizontalMap\lhvee-\empty-\lthookb} \def\dIntoA{\VerticalMap \dthooka|\empty|\dhvee} \def\dIntoB{\VerticalMap\dthookb|\empty|\dhvee} \def \uIntoA{\VerticalMap\uhvee|\empty|\uthooka} \def\uIntoB{\VerticalMap\uhvee|% \empty|\uthookb} \let\uInfromA\uIntoA\let\uInfromB\uIntoB\let\lInfromA\lIntoA \let\lInfromB\lIntoB\let\rInto\rIntoA\let\lInto\lIntoA\let\dInto\dIntoB\let \uInto\uIntoA \def\rEmbed{\HorizontalMap\gt-\empty-\rhvee} \def\lEmbed{\HorizontalMap\lhvee -\empty-\lt} \def\dEmbed{\VerticalMap\vee|\empty|\dhvee} \def\uEmbed{% \VerticalMap\uhvee|\empty|\wedge} \def\rProject{\HorizontalMap\empty-\empty-\triangleright} \def\lProject{% \HorizontalMap\triangleleft-\empty-\empty} \def\uProject{\VerticalMap \triangleup|\empty|\empty} \def\dProject{\VerticalMap\empty|\empty|% \littletriangledown} \def\rOnto{\HorizontalMap\empty-\empty-\twoheadrightarrow} \def\lOnto{% \HorizontalMap\twoheadleftarrow-\empty-\empty} \def\dOnto{\VerticalMap\empty|% \empty|\twoheaddownarrow} \def\uOnto{\VerticalMap\twoheaduparrow|\empty|% \empty} \let\lOnfrom\lOnto\let\uOnfrom\uOnto \def\hEq{\HorizontalMap==\empty==} \def\vEq{\VerticalMap\|\|\empty\|\|} \let \rEq\hEq\let\lEq\hEq\let\uEq\vEq\let\dEq\vEq \def\hLine{\HorizontalMap\empty-\empty-\empty} \def\vLine{\VerticalMap\empty|% \empty|\empty} \let\rLine\hLine\let\lLine\hLine\let\uLine\vLine\let\dLine \vLine \def\rPto{\HorizontalMap\empty-\empty-\rightharpoonup} \def\lPto{% \HorizontalMap\leftharpoonup-\empty-\empty} \def\uPto{\VerticalMap \upharpoonright|\empty|\empty} \def\dPto{\VerticalMap\empty|\empty|% \downharpoonright} \let\lPfrom\lPto\let\uPfrom\uPto \def\drBent{\VerticalMap\empty\empty\rdmcorner|\empty} \def\dlBent{% \VerticalMap\empty\empty\ldmcorner|\empty} \def\urBent{\VerticalMap\empty|% \rumcorner\empty\empty} \def\ulBent{\VerticalMap\empty|\lumcorner\empty\empty } \def\rdBent{\HorizontalMap\empty\empty\drmcorner-\empty} \def\ldBent{% \HorizontalMap\empty-\dlmcorner\empty\empty} \def\ruBent{\HorizontalMap\empty \empty\urmcorner-\empty} \def\luBent{\HorizontalMap\empty-\ulmcorner\empty \empty} \def\drBentto{\VerticalMap\empty\empty\rdmcorner|\dhvee} \def\dlBentto{% \VerticalMap\empty\empty\ldmcorner|\dhvee} \def\urBentto{\VerticalMap\uhvee|% \rumcorner\empty\empty} \def\ulBentto{\VerticalMap\uhvee|\lumcorner\empty \empty} \def\rdBentto{\HorizontalMap\drmcorner-\empty-\rhvee} \def\ldBentto{% \HorizontalMap\lhvee-\empty-\dlmcorner\empty\empty} \def\ruBentto{% \HorizontalMap\urmcorner-\empty-\rhvee} \def\luBentto{\HorizontalMap\lhvee-% \empty-\ulmcorner} \def\pile#1{{\incommdiagtrue\null\baselineskip\zpt\lineskip\zpt\lineskiplimit \zpt\mathsurround\zpt\tabskip\zpt\let\\\cr\vcenter{\halign{ \hfil$##$\hfil\cr #1 \crcr}}}} \def\SEpbk{\rlap{\smash{\kern0.1em \vrule depth 2.67ex height -2.55ex width 0% .9em \vrule height -0.46ex depth 2.67ex width .05em }}} \def\SWpbk{\llap{% \smash{\vrule height -0.46ex depth 2.67ex width .05em \vrule depth 2.67ex height -2.55ex width .9em \kern0.1em }}} \def\NEpbk{\rlap{\smash{\kern0.1em \vrule depth -3.48ex height 3.67ex width 0.95em \vrule height 3.67ex depth -1% .39ex width .05em }}} \def\NWpbk{\llap{\smash{\vrule height 3.6ex depth -1.39% ex width .05em \vrule depth -3.48ex height 3.67ex width .95em \kern0.1em }}} \def\hboxsm#1{\setbox0=\hbox{#1}\ht0\zpt\dp0\zpt\box0} \textwidth=6.5in \oddsidemargin=0in \evensidemargin=0in \setlength{\baselineskip}{16pt} \parskip=14pt \parindent=0pt \hyphenation{hom-ob-ject hom-ob-jects} % Springer-Verlag: %\magnification=\magstep1 %\vsize=23.5true cm %\hsize=16true cm %\nopagenumbers %\topskip=1truecm %\headline={\tenrm\hfil\folio\hfil} %\raggedbottom %\abovedisplayskip=3mm %\belowdisplayskip=3mm %\abovedisplayshortskip=3mm %\belowdisplayshortskip=3mm %\normalbaselineskip=12pt %\normalbaselines \begin{document} \title{Temporal Structures} \author{Ross Casley$\dagger$ \and Roger F. Crew$\dagger$ \and Jos\'e Meseguer$\ddagger$ \and Vaughan Pratt$\dagger$} %\date{} \maketitle {\parindent=0pt $\dagger$ Dept. of Computer Science, Stanford University, Stanford, CA 94305 \\ $\dagger$ Supported by the National Science Foundation under grant CCR-8814921 \\ $\ddagger$ SRI International, Menlo Park, CA 94025 and \\ Center for the Study of Language and Information, Stanford University, Stanford, CA 94305 \\ $\ddagger$ Supported by the Office of Naval Research under contracts N00014-86-C-0450 and N00014-88-C-0618, and by the National Science Foundation under grant CCR-8707155. This paper is a revision of a CTCS-89 paper \cite{CCMP}. \begin{abstract} We combine the principles of the Floyd-Warshall-Kleene algorithm, enriched categories, and Birkhoff arithmetic, to yield a useful class of algebras of transitive vertex-labeled spaces. The motivating application is a uniform theory of abstract or parametrized time in which to any given notion of time there corresponds an algebra of concurrent behaviors and their operations, always the same operations but interpreted automatically and appropriately for that notion of time. An interesting side application is a language for succinctly naming a wide range of datatypes. \end{abstract} \section{Introduction} Posets, metric spaces, ``closed'' automata, and categories have in common the notion of a {\it space} of points with distances between points. These distances are respectively truth values, reals, languages, and sets. Distances have two facets, logical and metrical. The logical facet is expressed respectively via implications $p\to q$ between truth values, comparisons $x\ge y$ between reals, inclusions $L\subseteq M$ between languages, and functions $f:X\to Y$ between sets. The metrical facet is expressed via a suitable monotone associative operation, respectively conjunction $p\land q$, addition $x+y$, concatenation $LM$, and cartesian product $X\times Y$. These two facets confer on any such set of distances the attributes of an ordered monoid $(D,\le,\otimes,I)$, having simultaneously the attributes of a poset $(D,\le)$ and a monoid $(D,\otimes,I)$, with $\otimes$ monotone in each argument with respect to $\le$. For such cases as our last example, sets as distances, the poset structure is generalized to category structure, so that rather than an ordered monoid we have a monoidal category, for which ``monotone operation'' must be correspondingly generalized to ``functor.'' The transitivity law $u\le v\land v\le w\to u\le w$ for a poset, the triangle inequality $d(u,v)+d(v,w)\ge d(u,w)$ for a metric space, the requirement $L_{uv}L_{vw}\subseteq L_{uw}$ for an automaton to be considered closed, and the family of composition operations $m_{uvw}:\Hom(v,w)\times\Hom(u,v)\to\Hom(u,w)$ for a category, respectively combine these two facets via essentially the same basic triangle inequality. Each of these classes of generalized metric spaces has a natural notion of map, respectively monotone functions, contractions, morphisms of automata, and functors, in each case making that class a category with those maps as its morphisms. In computer science some of the common elements of these notions have been unified by organizing distances as an {\it idempotent semiring}, an ordered monoid whose underlying partial order contains all sups and whose monoidal operation preserves (i.e. distributes over) those sups. The basis for this unification is the O$(n^3)$ time procedure of Roy \cite{Roy59} and independently that of S. Warshall \cite{War62} for computing the transitive closure of a binary relation on $n$ elements presented as an $n\times n$ Boolean (0- and 1-valued) matrix. The unification was hinted at by R.W. Floyd \cite{Flo62} who observed that Warshall's procedure would compute shortest paths instead of transitive closure if Booleans were replaced by nonnegative reals, disjunction by {\bf min}, and conjunction by addition. The uniform expression of this common algorithm in terms of semirings was first described by Robert and Ferland \cite{RF}. Synonyms for this notion of semiring include regular algebra \cite{Con}, Kleene algebra \cite{Koz80b,Koz81a}, and quantale \cite{Vic89}. Other instantiations of this abstract algorithm were subsequently found. Replacing Booleans in Warshall's algorithm by languages, conjunction by concatenation, and disjunction by union, yields Kleene's algorithm for ``closing'' an automaton $M$ having $n$ states, viewed as an $n\times n$ matrix of (finitely presented) regular languages, from which one may then easily read off a regular expression denoting the language $L(M)$ accepted by $M$ \cite{AHU}. Even Gaussian elimination was found to be so describable in the (nonidempotent) ring of reals made a field via $1/(1-x)=1+x+x^2+\ldots$. Independently and working in a categorical setting, Eilenberg and Kelly \cite{EK66a} developed a more categorically sophisticated version of the same generalization of metric space under the name enriched category or $V$-category. In place of a semiring they used a monoidal category $V$. Distances became homobjects, a generalization of homset. The logical facet was expressed by the category structure of $V$: the morphisms of $V$ permitted ``comparisons'' of homobjects. The metrical facet was expressed by the monoidal structure of $V$: ``consecutive'' homobjects were combined by the binary operation of the monoid. Although Eilenberg and Kelly described enriched categories in their full generality, their motivating applications were confined to $V$'s forming classes rather than sets, an emphasis continued in Kelly's subsequent book on enriched categories \cite[p22]{Kel}. Yet in 1974 F.W. Lawvere \cite{Law} in an excellent advertisement for the utility of enriched categories emphasized $V$'s that were semirings, hence sets rather than classes, and with category structure merely that of a poset. This brought enriched categories into close proximity to the parallel computer science development. Nevertheless this connection between enriched categories and shortest-path algorithms remained undetected for another 15 years \cite{Pr89a}. The present paper starts from the notion of a partial order as a behavior of a ``truly concurrent'' process, and uniformly extends it to other classes of spaces via the above correspondences. This extension was first proposed by Pratt \cite{Pr84} with just the semiring view in mind; here we extend that proposal to take advantage of the enriched category perspective as well as additional basic operations whose utility were not at all apparent at the time, and develop the resulting framework in detail. This approach achieves a considerable unification of ideas relevant to concurrency, as well as making connections with other areas to which the semiring and enrichment insights apply. In the concurrency application we characterize time abstractly as an ordered monoid, and more generally albeit speculatively as a monoidal category, whose objects are temporal quantities. From this model of time we construct via enrichment a category of behaviors. A behavior, or computation, is a space whose points represent events and whose distances are to be interpreted as delays between events. Various natural operations on such spaces correspond to useful constructs for concurrent programming languages. These operations are functors, most of which prove to be definable via familiar categorical constructions. We treat only concurrency and not nondeterminism (choice), in that we work only with single behaviors rather than sets of them representing alternative behaviors. An appealing feature of this approach is its abstractness. A single framework is developed independently of choice of ordered monoid or monoidal category. Instantiating the whole framework for a particular monoidal structure yields the corresponding model of concurrency incorporating that structure as its notion of time, with all the operations of the framework likewise instantiated. The development lends itself to the application of categorical methods. A practical application of this perspective is to improving the organization of current theories of real time in concurrency modeling. A case in point is the recent work of H. Lewis \cite{Lew90}. Lewis works with state diagrams each of whose transitions is labeled with a set of $O(n^2)$ intervals, with larger sets at later transitions, per his Figure 6. In our framework the essence of this information would be captured with one real labeling each edge of the {\it transitive closure} of the diagram, with the delay from $u$ to $v$ being a lower bound whose matching upper bound (to form an interval) is the negation of the delay from $v$ to $u$. The ordered monoids that have previously been found useful in this setting are all useful here for one view or another of time. In addition we identify a class of finite generalizations of the ordered monoid $\two$ of truth values which we call the {\it idempotent closed ordinals} or ico's. There are $2^{n-2}$ such closed or residuated ordered monoids with $n$ elements, exactly one of which is cartesian closed, proved via a pretty representation theorem. We describe natural applications for the two three-element ico's $\three$ and $\three'$, and show where each has in effect been used in the concurrency literature. The operations on spaces ordinarily considered in the context of shortest-path algorithms and their cousins can be collectively understood as Kleene's {\it regular} operations $L+M$, $LM$, and $L^*$, defined by Kleene only for languages but all equally meaningful for the other domains, even the one for Gaussian elimination (with $x^*={1/(1-x)}$). In terms of matrices these are the operations of pointwise sum of two $m\times n$ matrices $M,N$ to yield an $m\times n$ matrix $M+N$, product of an $m\times k$ matrix $M$ by a $k\times n$ matrix $N$ to yield an $m\times n$ matrix $MN$, and reflexive and/or transitive closure of an $n\times n$ matrix $M$ to yield an $n\times n$ matrix $M^*$. A reasonably close connection between such matrices and spaces can be made by regarding rectangular $m\times n$ matrices as complete bipartite graphs from $m$ vertices to $n$ vertices, and in the other direction ordinary (nonbipartite) directed graphs as square matrices, with distances entering as edge labels. This paper adds to these regular operations a number of other operations such as disjoint union or juxtaposition, tensor product, concatenation, exponentiation, and useful variations on these obtained by generalizing products to pullbacks and coproducts to pushouts. These operations are generally better matched to the concurrency modeling application than the regular operations, both extrinsically and intrinsically. Extrinsically juxtaposition captures concurrence, tensor product captures orthocurrence, etc. And intrinsically these operations impose few if any constraints on relationships between vertex sets of their arguments, unlike the regular operations. An early and striking example of these ``nonregular'' operations is provided by Birkhoff's arithmetic \cite{Birk37,Birk42} of posets up to isomorphism under addition, multiplication, and exponentiation each of two kinds, cardinal and ordinal. Birkhoff's application was to the arithmetic of cardinals and ordinals, which he proposed to unify by regarding both as posets, with cardinals as discrete posets and ordinals as linear. In place of two sorts of data he then had two sorts of operations. In relating Birkhoff arithmetic to concurrent programming we make the connections cardinal-concurrent and ordinal-sequential. Discrete posets model the purely concurrent behaviors (no sequentiality) while linearly ordered posets model the purely sequential. The cardinal operations map discrete sets to discrete, i.e. they preserve concurrency, while the ordinal operations map linear sets to linear, i.e. they preserve sequentiality. Our framework can then be viewed as a generalization of Birkhoff arithmetic, in several directions: several additional operations, many other metrics besides $\two$, provision of labels on points, and setting Birkhoff arithmetic in a suitable categorical framework. We have not however succeeded in finding the right categorical expression of either ordinal multiplication (i.e. lexicographic product) or ordinal exponentiation, which we therefore raise as an interesting problem. There is a recursive aspect to the enrichment process that permits a further generalization of this framework. We introduce an operation we call $\D!$, the enriched category term for which is $V$-Cat,\footnote{We prefer $\D$ to $V$ as connoting distance or delay.} which takes a symmetric monoidal category $\D$ and returns the symmetric monoidal category $\D!$ of all small $\D$-categories. For example if $\D$ is the monoidal category $\{0,1\}$ of truth values then $\D!$ is the monoidal category of preordered sets. This construction can therefore be iterated to yield $\D!!$, $\D!!!$, etc. Behaviors as sets of events require not only delay information between events but information describing each event. That is, we wish to label vertices independently of the labeling of edges. From a set theoretic perspective there is nothing to this. However from a category theoretic perspective, with some operations defined as limits or colimits the presence of labels is a nontrivial complication; consider for example coproducts in the category of vertex-labeled posets. We define the category of $\E$-labeled $\D$-spaces, each of whose objects is an object $d$ of $\D$ (we call such a $d$ a $\D$-space) paired with an object $e$ of $\E$, along with a function $f:U_d\to V_e$ from the underlying set of $d$ (the points of the space $d$) to the underlying set of $e$ (typically the set $e$ itself, construed as an alphabet of labels) serving as a vertex labeling function. The appropriate category of such $\E$-labeled $\D$-spaces is the comma category $(U,V)$. To make the comma-category construct iterable analogously to the iterability of enrichment we need to extend its arguments so as to carry both the structure we need for enrichment (i.e. a symmetric monoidal category) and that for the comma construction (hence we need a forgetful functor). We denote this extension of the comma construction to these extended arguments by $\D\comma\E$. With these two operations, along with certain constants, we now have a language with such expressions as $\one!$, $\three!!\comma\one!$, $\R!$, etc. The succinctness of each expression belies its content. For example the expression $\one!!!$ does not merely hint at the category of all 2-categories but specifies it in full detail, complete with all internal features such as the interchange law, 2-functors between 2-categories, etc. Moreover it supplies some external features: it is a closed category, and is equipped with a forgetful functor to $\Set$ taking each 2-category to the set of its objects. However it is not a 3-category as it should be, or even a 2-category, and has no other useful forgetful functors such as to $\Cat$. These restrictions reflect our particular recursive construction of categories, which yields only semiconcrete symmetric monoidal categories. \section{Operations} The motivating application of our framework is to define an algebra of concurrent behaviors (runs, computations), independently of any particular choice of notion of time. In this section we describe the desired operations of such an algebra, and illustrate them for {\it dual} metric spaces, spaces in which distance $d$ from $u$ to $v$ indicates that $v$ must follow $u$ by {\it at least} $d$ units (metric spaces would replace ``at least'' by ``at most''). In formal language theory, concatenation is defined on individual strings as well as on languages (sets of strings) whereas union and Kleene star are defined only on languages. In the framework of the present paper strings are generalized to {\it behaviors}, defined as labeled spaces, with languages correspondingly generalized to {\it processes} as sets of behaviors. We shall define only operations on individual behaviors, hence including concatenation but excluding union and Kleene star. The operations we treat include all behavior operations of the process language of \cite{Pr86}, namely concurrence, orthocurrence, concatenation, and local concatenation, as well as new operations synchronized concurrence, exponentiation, product, and local product. The process operations of that paper are linearization, union, intersection, complement, star, augment closure, and prefix closure, whose definition we defer for now pending the appropriate integration of our framework with the current understanding of nondeterminism. We now illustrate and define three forms of sum: concurrence $p|q$, concatenation $p;^dq$, and local concatenation $p\lc^dq$. In these examples all edges are labeled with reals or $\infty$, with absence of an edge interpreted as distance $-\infty$. These examples may be taken as pomset examples by ignoring the edge labels (equivalent to taking $-\infty$ as 0 and everything else as 1), and as automata examples by treating distance $d$ as the set of all strings of length at most $d$ (making $-\infty$ the empty language). In all of these forms of sum, the set of points of the sum is the disjoint union of those of $p$ and $q$. That is, the basic step in forming the sum is to juxtapose $p$ and $q$. {\it Concurrence} $p|q$ is the least constrained form of sum. Labels on points, and distances within $p$ and $q$, remain unchanged, while the distance from an event of $p$ to one of $q$ is $-\infty$, and likewise from $q$ to $p$. {\it Disjoint} concurrence differs from concurrence in that the labels from $p$ and $q$ are ``marked'' to distinguish them: the label $a$ becomes $a_0$ or $a_1$ according to whether the point it labels is from $p$ or $q$. \setlength{\unitlength}{0.0088in} \begin{center} \begin{picture}(671,130)(40,660) \put( 25,670){Concurrence $(a;^3b)|(c|d)$} \put( 45,715){$b$} \put( 45,755){$3$} \put( 52,790){$a$} \put( 55,785){\vector( 0,-1){ 55}} \put( 82,752){$|$} \put(103,790){$c$} \put(104,715){$d$} \put(105,730){$\bullet$} \put(105,780){$\bullet$} \put(134,753){$=$} \put(160,755){$3$} \put(166,715){$b$} \put(167,790){$a$} \put(170,780){\vector( 0,-1){ 50}} \put(192,790){$c$} \put(193,780){$\bullet$} \put(194,715){$d$} \put(195,730){$\bullet$} \put(230,670){Concatenation $(a;^3b);^2(c|d)$} \put(270,750){$3$} \put(282,790){$a$} \put(284,715){$b$} \put(285,787){\vector( 0,-1){ 55}} \put(312,754){$;^2$} \put(333,790){$c$} \put(334,715){$d$} \put(335,730){$\bullet$} \put(335,780){$\bullet$} \put(360,755){$=$} \put(390,750){$3$} \put(396,715){$b$} \put(397,790){$a$} \put(400,730){\vector( 1, 0){ 50}} \put(400,730){\vector( 1, 1){ 50}} \put(400,782){\vector( 0,-1){ 50}} \put(400,785){\vector( 1, 0){ 50}} \put(400,785){\vector( 1,-1){ 50}} \put(415,713){$2$} \put(416,736){$2$} \put(415,790){$5$} \put(438,748){$5$} \put(448,715){$d$} \put(448,790){$c$} \put(480,670){Local Concatenation $(a;^3B)\underline ;^2(c|D)$} \put(513,750){$3$} \put(520,715){$B$} \put(522,790){$a$} \put(525,787){\vector( 0,-1){ 55}} \put(552,754){$\underline ;^2$} \put(573,790){$c$} \put(575,715){$D$} \put(575,730){$\bullet$} \put(575,780){$\bullet$} \put(600,755){$=$} \put(630,750){$3$} \put(635,715){$B$} \put(637,790){$a$} \put(640,730){\vector( 1, 0){ 45}} \put(640,782){\vector( 0,-1){ 50}} \put(640,785){\vector( 1, 0){ 45}} \put(655,715){$2$} \put(655,790){$2$} \put(682,790){$c$} \put(684,715){$D$} \end{picture} \centerline{Figure 1. Additive Operations.} \end{center} {\it Concatenation} $p;^dq$ is like $p|q$, differing only with respect to the distances from $p$ to $q$, which are the least possible distances no less than $d$. Disjoint concatenation is to concatenation as disjoint concurrence is to concurrence. {\it Local concatenation} $p\lc^dq$ is intermediate in strength between concurrence and concatenation: it only imposes the additional distance constraints of concatenation between colocated elements of $p$ and $q$. For the above example we have identified location with case of label: lower case at one location, upper at the other. We now illustrate and define three forms of product, namely orthocurrence $p\otimes q$, product $p\times q$, and local product $p\underline\times q$. \setlength{\unitlength}{0.0088in} \begin{center} \setlength{\unitlength}{0.0088in} \begin{picture}(671,130)(40,520) \put( 20,530){Orthocurrence $(a;^3b)\otimes(c;^2d)$} \put( 40,615){$3$} \put( 45,575){$b$} \put( 45,650){$a$} \put( 50,645){\vector( 0,-1){ 55}} \put( 65,615){$\otimes$} \put( 85,575){$d$} \put(85,650){$c$} \put(90,615){$2$} \put( 90,645){\vector( 0,-1){ 55}} \put(115,615){$=$} \put(130,575){$bc$} \put(130,650){$ac$} \put(148,615){$3$} \put(145,645){\vector( 0,-1){ 50}} \put(145,645){\vector( 1, 0){ 55}} \put(150,590){\vector( 1, 0){ 50}} \put(150,645){\vector( 1,-1){ 45}} \put(170,575){$2$} \put(170,650){$2$} \put(175,620){$5$} \put(205,575){$bd$} \put(205,645){\vector( 0,-1){ 50}} \put(205,650){$ad$} \put(210,615){$3$} \put(270,530){Product $(a;^3b)\times(c;^2d)$} \put(275,615){$3$} \put(280,575){$b$} \put(280,650){$a$} \put(285,645){\vector( 0,-1){ 55}} \put(300,615){$\times$} \put(320,575){$d$} \put(320,650){$c$} \put(325,615){$2$} \put(325,645){\vector( 0,-1){ 55}} \put(350,615){$=$} \put(365,575){$bc$} \put(365,650){$ac$} \put(380,645){\vector( 0,-1){ 50}} \put(380,645){\vector( 1, 0){ 55}} \put(385,590){\vector( 1, 0){ 50}} \put(385,645){\vector( 1,-1){ 45}} \put(385,615){$3$} \put(405,575){$2$} \put(405,650){$2$} \put(410,620){$2$} \put(440,575){$bd$} \put(440,650){$ad$} \put(445,615){$3$} \put(440,645){\vector( 0,-1){ 50}} \put(500,530){Local Product $(a;^3b)\underline\times c(;^2D,;^1c)$} \put(505,615){$3$} \put(510,575){$B$} \put(510,650){$a$} \put(515,645){\vector( 0,-1){ 55}} \put(530,615){$\underline\times$} \put(550,575){$D$} \put(555,615){$2$} \put(570,650){$c$} \put(575,645){\vector( 1,-3){ 18.500}} \put(575,645){\vector(-1,-3){ 18.500}} \put(590,575){$e$} \put(590,615){$1$} \put(615,615){$=$} \put(635,640){$ac$} \put(652,640){\vector( 1, 0){ 45}} \put(665,588){$BD$} \put(670,645){$1$} \put(675,600){$\bullet$} \put(700,640){$ae$} \end{picture} \centerline{Figure 2. Multiplicative Operations.} \end{center} The underlying set of each of these products is the cartesian product of the underlying sets of their arguments (or a subset thereof in the case of local product), while their labels are corresponding tuples: thus if $\mu$ assigns labels to points then the label $\mu(\)$ in a product is $\<\mu_p(u),\mu_q(v)>$. {\it Orthocurrence} $p|q$ is distinguished from other products by the distance from $\$ to $\$ being $d(u,u')+d(v,v')$. {\it Product} $p\times q$ takes this distance to be min$(d(u,u'),d(v,v'))$. {\it Local product} $p\underline\times q$ is obtained from product by deleting all points with mixed locations (again indicated by case in the example), and reducing the distance between tuples at distinct locations to $-\infty$. For pomsets orthocurrence and product coincide, both combining the distances $d(u,u')$ and $d(v,v')$ via conjunction. For automata they differ: orthocurrence uses concatenation, product intersection. {\em Basic Constants}. The empty schedule, denoted $0$, has no events. It is the identity for all sums: concurrence, concatenation, and local concatenation. The unit schedule, denoted $I$, has one event with self-distance 0, and has the singleton alphabet $\{\bullet\}$, whence that one event is labeled $\bullet$. Up to isomorphism $I$ is the identity for orthocurrence. The top schedule, denoted 1, differs from $I$ in having self-distance $\infty$. Up to isomorphism it is the identity for product. (The isomorphism is not only between events but between labels, via the evident isomorphism between $\Sigma$ and $\Sigma\times\{\bullet\}$.) We have illustrated these operations and constants for (dual) metric spaces, and indicated how to derive the corresponding pomset and automata examples. However these operations and constants also admit of obvious interpretations for the metrics themselves. Concurrence is respectively max, disjunction, and union for each of the ordered monoids consisting of truth values, reals, and languages, and is the same operation as concatenation and local concatenation. Orthocurrence is respectively arithmetic sum, conjunction, and concatenation. Product is respectively min, conjunction, and intersection, and is the same operation as local product. %{\em Exponentiation}. Denoted $B^A$. The events of this schedule are the %delay-preserving functions from $A$ to $B$. For the pomset model we %consider $f$ to precede $g$ if $fa$ precedes $ga$ for all events $a$ in %$A$. For the minimum delay model the delay from $f$ to $g$ is the infimum %of the delays from $fa$ to $ga$ taken over the events of $A$. $B^A$ can %be interpreted as being derived from $B$ by redefining an event to be a %{\em pattern\/} of events defined by $A$. For example if $A$ is simply an %ordered pair of events, then the events of $B^A$ are ordered pairs of %events in $B$. \section{Monoidal Categories and their Functors} Monoidal categories and enrichment are less well established in the computing literature than such other aspects of category theory as adjunctions. We therefore recall here enough details of these notions to make this paper self-contained at least on a first reading by those familiar with at least adjunctions. In addition our treatment will serve to define the perspective on these topics that we will assume of the reader, and to coordinate this perspective with the rest of the paper. Considerably more information on these topics can be found in the books of Mac~Lane \cite{Mac} and Kelly \cite{Kel}. \subsection{Monoidal Categories} Informally, a monoidal category amounts to a structure that is both a monoid and a category. Formally a {\it strict monoidal category} $\D=(D,\otimes,I)$ is a category $D$ together with a functor \hbox{$\otimes:D^2\to D$} called the {\it tensor product} \footnote{Mac~Lane writes $\otimes$ as $\Box$.} and an object $I$ of $D$ called the {\it unit}, such that the object part and the morphism part of $D$ each form a monoid under $\otimes$ with respective identities $I$ and $1_{I}$. We refer to $(\otimes,I)$ as a {\it monoidal structure} for the category $\D$. The structure $(\Set,\times,\{\bullet\})$ with $\times$ cartesian product is not strict monoidal because in general $X\times(Y\times Z)$ is not equal to $(X\times Y)\times Z$, they are merely isomorphic. Moreover there is a particular isomorphism we would like to be able to {\it assume} is the one meant when we say that they are isomorphic, namely $\alpha_{XYZ}:(X\times Y)\times Z\to X\times(Y\times Z)$ defined as $\alpha(\<\,z>)=\>$. Similarly particular isomorphisms take the place of the two identity laws for the unit $I=\{\bullet\}$. We therefore define a more general notion. A {\it monoidal category} $\D=(D,\otimes,I,\alpha,\lambda,\rho)$ is as for strict monoidal categories but specifying natural isomorphisms $\alpha:(c\otimes d)\otimes e\cong c\otimes(d\otimes e)$, $\lambda:I\otimes d\cong d$ and $\rho:d\otimes I\cong d$ in place of the usual three-axiom basis for the theory of monoids. A {\it symmetric} monoidal category specifies an additional natural isomorphism $\gamma:d\otimes e\cong e\otimes d$. We shall confine ourselves to symmetric monoidal categories throughout, and understand ``monoidal'' to mean symmetric monoidal at all times. The intent of these isomorphisms is that they be canonical: if an element of one set corresponds to an element of another set at all, this is a universal or global correspondence. In particular there may be at most one such isomorphism between two sets, and in the case of a set in isomorphism with itself that isomorphism must be the identity. This intuition is formalized via certain {\it coherence conditions}, whose effect is that if there are multiple ways to infer by transitivity two isomorphisms between two sets, those isomorphisms must be the same. A strict monoidal category amounts to a monoidal category whose such isomorphisms are all identities. A monoidal category $C$ is {\it left closed} ({\it right closed}) when ${-}\otimes b$ ($a\otimes{-}$) has a right adjoint. When both exist it is called biclosed. When $C$ is symmetric, either left closed or right closed implies biclosed, and in this case we simply call it closed. The right adjoint to ${-}\otimes b$ is notated ${-}^b:C\to C$ and defined by an isomorphism $\Hom(a\otimes b,c)$ and $\Hom(a,c^b)$ natural in $a$ and $c$. Setting $a$ to $I$ yields via $\lambda$ the natural isomorphism $b\to c\cong I\to c^b$, that is, $\Hom$ is naturally isomorphic to $\Hom':C\op\times C\stackrel{{-}^{-}}{\to}C\stackrel{\Hom(I,-)}{\longrightarrow}\Set$. In this sense ${-}^{-}$ {\it represents} $\Hom(b,c)$, making it the {\it internal hom}(functor). As $\R\op_\ge$ in example (3) below shows, $I$ need not determine $\otimes$ and hence the internal hom even up to isomorphism, showing that it is possible for the internal hom to contain information not present in the external hom even together with Since left adjoints preserve colimits, we have in any closed category $(A+B)\otimes C\cong A\otimes C+B\otimes C$ and $C\otimes(A+B)\cong C\otimes A+C\otimes B$ when the coproduct $A+B$ exists and $A\otimes 0\cong 0\cong 0\otimes A$ when the initial object 0 exists. A category $D$ with all finite products determines the {\it cartesian} symmetric monoidal category $(D,\times,1)$. When the latter is closed (common but not universal, e.g. {\bf Top}), $D$ is said to be {\it cartesian closed}. \subsection{Examples of Monoidal Categories} We illustrate the above definitions with the monoidal categories we will be using in KL. Most of these will be closed and bicomplete, the kind we are most interested in. (1) Each successor ordinal $\bf n{+}1$, as an $n{+}1$-object category with $n{+}2 \choose 2$ morphisms $i\to j$ where $0\le i\le j\le n$, forms the cartesian closed category algebraic topologists call $[n]$. That is, the symmetric monoidal structure is $(n{+}1,\land,n)$, and the right adjoint of $\land$, the internal hom ${-}^{-}$, must be the largest $a$ such that $a\land b\le c$, namely $n$ when $b\le c$ and $c$ otherwise. The product of two such cartesian closed ordinals or cco's is the cco $[m]\times[n]=[m+n]$. But the category $\bf n{+}1$ = $[n]$ admits other monoidal structures, all strict since $\bf n{+}1$ has no nonidentity isomorphisms, and all bicomplete. Of these, $2^n$ are idempotent ($x\otimes x=x$), since each is representable as a permutation of $\{0,1,\ldots,n\}$ whose domain partitions into two blocks on one of which the permutation is monotone and on the other antimonotone. Such a permutation can be written down by writing $0,1,2,\ldots,I$ (the monotone block) from left to right and then reversing direction so as to write $I+1,I+2,\ldots,n$ (the antimonotone block) from right to left interleaved arbitrarily with the monotone block, leaving $I$ at the far right. For $n=3$ this can be done in eight ways, namely $0123$, $01_32$, $0_312$, $0_{32}1$, $_3012$, $_30_21$, $_{32}01$, $_{321}0$, here distinguishing the two blocks by writing the second as subscripts. Then $x\otimes y$ is taken to be the earlier of $x$ and $y$ in the permutation. Since $I$ is always at the right end of the permutation it will always be the identity of $x\otimes y$. For $\otimes$ to be a functor it suffices that it be monotone, which the reader may verify. For $n>0$ exactly half of these are closed. For to be closed we require that for any $b$ and $c$ there be a largest $a$ for which $a\otimes b\le c$. Setting $c=0$ shows that $0\otimes b$ must be 0 for all $b$, whence a necessary condition is that the permutation start with 0. But this is also sufficient since there then exists a solution in $a$ to $a\otimes b\le c$, namely $a=0$; finiteness then ensures a largest solution. These then are the {\it idempotent closed ordinals} or ico's. There is therefore a unique ico {\bf 2}, namely $[1]$. Here $\otimes$ is $\land$ and $I=1$. (The nonclosed one has $\otimes=\lor$ and $I=0$.) This category provides the metric for preordered sets. This two-valued cartesian closed logic is that of ordinary precedence, where for any pair $u,v$ of events there are two cases: either $u$ is constrained to precede $v$, or not. There are two closed categories on 3, each appearing implicitly in one of H. Gaifman's two papers on concurrency. In each, the elements of 3 represent strengths of temporal precedence constraint between two events, with 0 representing no constraint. In the noncartesian case, call it $\three'$, 1 represents nonstrict temporal precedence and 2 strict, with $1\otimes 2=2$ ($u\le v